<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
	<?php $this->load->view('common/top', array('title' => 'SEWIKI - CHAPTERLIST')); ?>
<script type="text/javascript">
</script>
	<body>
		<div id="container">
			<?php $this->load->view('common/header'); ?>
			<div id="content">
				<?php $this->load->view('common/menu'); ?>
				<div id="main">
					<div id="book_info_title" class="title">
						图书<?=$book['title']?>
						<a class="<?=$adminAuth?>" href="<?=site_url('admin/ChapterManager/createChapter/' . $book['bid'])?>">[创建新章节]</a>
					</div>
					<div id="book_info" class="desc">
						<?=$book['description']?>
					</div>
					<div id="chapter_list_title" class="subtitle">
						章节列表
					</div>
					<div id="chapter_list" class="text">
						<table width="100%">
							<?php foreach($chapters as $chapter): ?>
								<?php $this->load->view('browser/chapterItem', $chapter);?>
							<?php endforeach;?>
							<?php if(count($chapters) == 0): ?>
							<tr>
								&nbsp;还没有创建章节
							</tr>
							<?php endif; ?>
						</table>
					</div>
				</div>
			</div>
			<?php $this->load->view('common/footer'); ?>
		</div>
	</body>
</html>